package com.tuling.stu.dao.tx;

import org.springframework.stereotype.Repository;

import com.tuling.stu.base.dao.AbstractBaseDao;
import com.tuling.stu.entity.tx.Test2;

@Repository
public class TestDao extends AbstractBaseDao {
	public boolean addTest(Test2 test) throws IllegalArgumentException, IllegalAccessException {
		return add(test, "test2", "id", true);
	}
	
	public boolean updateFlagById(Integer id) throws Exception {
		int i = jdbcTemplate.update("update test2 set flag = 5 where id = ?", new Object[]{id});
		
		return i > 0;
	}
}
